package com.wireless.util;

import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Random;

public class CreateOrderId {
	public static String getOrderId() {
		String orderId = "";
		String date = new SimpleDateFormat("yyyyMMdd").format(new Date());
		String seconds = new SimpleDateFormat("HHmmss").format(new Date());
		orderId = date + getTwo();
		return orderId;
	}

	/**
	 * 产生随机的2位数
	 * 
	 * @return
	 */
	public static String getTwo() {
		Random rad = new Random();

		String result = rad.nextInt(100) + "";

		if (result.length() == 1) {
			result = "0" + result;
		}
		return result;
	}
}
